# -*- coding: utf-8 -*-
# @Time    : 2023/9/27 23:01
# @Author  : Z.J. Zhang
# @Email   : zijingzhang@mail.ustc.edu.cn
# @File    : tracer.py
# @Software: PyCharm
"""
粒子运动
Ref: GPT User Manual
Version 3.38
Eq. [1.14] on Page 24
"""
import typing

import numpy
from scipy.integrate import RK45

class SingleParticleTracer:
    """
    不考虑粒子-场相互作用的单粒子追踪
    即，粒子在给定矢量场中运动
    """
    def __init__(self, xp:numpy.ndarray,q:numpy.ndarray):
        """

        :param xp: shape (Nparticles, 6), example:
        [
        [x1, x2, x3, p1, p2, p3],
        ...
        ]

        """
        self.xp:numpy.ndarray = xp
        self.q = q
        self.history =
    def trace(self, how_to_get_E:typing.Callable[[numpy.ndarray],numpy.ndarray],
              how_to_get_B:typing.Callable[[numpy.ndarray],numpy.ndarray]):
        """
        :param how_to_get_E: 输入Nparticles个粒子6维坐标，输出Nparticles个场值
        :param how_to_get_B: 输入Nparticles个粒子6维坐标，输出Nparticles个场值
        :return:
        """
        get_F =



